package com.khong.baodizhen.activity;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;

import com.khong.baodizhen.R;
import com.khong.baodizhen.entity.CheckItem;

public class DBZCompanyInfoActivity extends Activity implements OnClickListener {

	private Button nextBtn;
	private EditText infoEdit;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.dbz_start_info);

		initView();
		fillData();
	}

	public void initView() {
		nextBtn = (Button) findViewById(R.id.btn_next);
		infoEdit = (EditText) findViewById(R.id.edit_info);
	}

	public void fillData() {
		nextBtn.setOnClickListener(this);

		CheckItem item = (CheckItem) getIntent().getSerializableExtra("data");
		if (item != null) {
			nextBtn.setVisibility(View.GONE);
			infoEdit.setEnabled(false);
			infoEdit.setText(getString(R.string.string_info));
			
		}

	}

	@Override
	public void onClick(View v) {
		Intent intent = new Intent();
		intent.setClass(this, DBZCompanyCheckItemActivity.class);
		startActivity(intent);
	}

}
